<?php

/**
 * 横跨月份
 * @param string $month 月份
 */
function strideMonth($month='2021-05'){
    $from = date("Y-m-02 00:00:00",strtotime($month));
    $to = date('Y-m-01 23:59:59', strtotime("{$month} +1 month"));
    print_r($from);
    die();
}

strideMonth();
